/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package orm;

import java.util.List;
import org.hibernate.criterion.DetachedCriteria;
import org.orm.PersistentSession;
import org.orm.criteria.*;

public class TipoProductoDetachedCriteria extends AbstractORMDetachedCriteria {
	public final IntegerExpression idTipo;
	public final StringExpression tipoPdto;
	
	public TipoProductoDetachedCriteria() {
		super(orm.TipoProducto.class, orm.TipoProductoCriteria.class);
		idTipo = new IntegerExpression("idTipo", this.getDetachedCriteria());
		tipoPdto = new StringExpression("tipoPdto", this.getDetachedCriteria());
	}
	
	public TipoProductoDetachedCriteria(DetachedCriteria aDetachedCriteria) {
		super(aDetachedCriteria, orm.TipoProductoCriteria.class);
		idTipo = new IntegerExpression("idTipo", this.getDetachedCriteria());
		tipoPdto = new StringExpression("tipoPdto", this.getDetachedCriteria());
	}
	
	public ProductoDetachedCriteria createProductoCriteria() {
		return new ProductoDetachedCriteria(createCriteria("producto"));
	}
	
	public TipoProducto uniqueTipoProducto(PersistentSession session) {
		return (TipoProducto) super.createExecutableCriteria(session).uniqueResult();
	}
	
	public TipoProducto[] listTipoProducto(PersistentSession session) {
		List list = super.createExecutableCriteria(session).list();
		return (TipoProducto[]) list.toArray(new TipoProducto[list.size()]);
	}
}

